/*
 * @Description: 深化设计策划书管理数据模型
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-08-18 11:02:39
 * @LastEditTime: 2021-08-19 16:40:15
 * @FilePath: \cscec-pms-admin\src\views\design\deepDesign\planningManagement\model.js
 */
import SelectSubCompany from '@/components/Select/SelectSubCompany'
import SelectProject from '@/components/Select/SelectProject'
import OrgTreeSelect from '@/components/OrgTreeSelect'
// 状态列表
const statusList = [
  {
    value: '0',
    label: '待提交审核'
  },
  {
    value: '1',
    label: '审核中',
  },
  {
    value: '2',
    label: '审核通过'
  },
  {
    value: '3',
    label: '审核不通过'
  }
]
// 深化设计成果列表
const deepList = [
  {
    value: '1',
    label: '钢结构'
  },
  {
    value: '2',
    label: '精装修',
  },
  {
    value: '3',
    label: '幕墙'
  },
  {
    value: '4',
    label: '园林绿化'
  },
  {
    value: '5',
    label: '安装'
  },
  {
    value: '6',
    label: '加固'
  }
]
// 搜索列表
const searchOption = [
  {
    name: '深化设计成果名称',
    value: 'resultsName',
    type: 'input'
  },
  {
    name: '深化项',
    value: 'deepenItem',
    type: 'select',
    data: deepList
  },
  {
    name: '所属单位',
    valueKey: 'searchQuery',
    type: OrgTreeSelect,
  },
  // {
  //   name: '分公司',
  //   valueKey: 'branchComId',
  //   type: SelectSubCompany
  // },
  // {
  //   name: '项目名称',
  //   keyValue: 'branchComId',
  //   valueKey: 'projectId',
  //   type: SelectProject
  // },
  {
    name: '状态',
    value: 'resultsStatus',
    type: 'select',
    data: statusList
  },
]
// 表头
const columns = [
  {
    title: '序号',
    width: 80,
    align: 'center',
    customRender: (text, record, index) => {
      return index + 1
    }
  },
  {
    title: '深化设计成果名称',
    width: 300,
    dataIndex: 'resultsName'
  },
  {
    title: '项目名称',
    width: 200,
    dataIndex: 'projectName'
  },
  {
    title: '分公司',
    width: 200,
    dataIndex: 'branchComName'
  },
  {
    title: '项目设计管理类别',
    dataIndex: 'designCategoryName'
  },
  {
    title: '设计单位',
    width: 200,
    dataIndex: 'designUnitName'
  },
  {
    title: '深化设计策划书',
    width: 300,
    dataIndex: 'designDeepenBookName'
  },
  {
    title: '深化项',
    dataIndex: 'deepenItemName',
  },
  {
    title: '深化设计资料',
    dataIndex: 'designDeepenMaterialName',
  },
  {
    title: '状态',
    dataIndex: 'resultsStatusName',
  },
  {
    title: '操作',
    dataIndex: 'operation',
    width: 200,
    fixed: 'right',
    scopedSlots: { customRender: 'operation' }
  }
]

// 深化设计单位名称搜索列表
const searchUnitArr = [
  {
    name: '设计资源名称',
    value: 'designResourceName',
    type: 'input'
  },
  {
    name: '设计资源类型',
    value: 'resTypeId',
    type: 'select',
    data: []
  },
  {
    name: '设计资源等级',
    value: 'resLevelId',
    type: 'select',
    data: []
  }
]
const modalUnitColumns = [
  {
    title: '序号',
    width: 80,
    align: 'center',
    customRender: (text, record, index) => {
      return index + 1
    }
  },
  {
    title: '设计资源名称',
    dataIndex: 'name'
  },
  {
    title: '设计资源类型',
    dataIndex: 'resTypeName'
  },
  {
    title: '设计资源等级',
    dataIndex: 'resLevelName'
  },
]

// 深化设计资料图纸搜索列表
const searchMaterialArr=[
  {
    name: '深化图纸名称',
    value: 'name',
    type: 'input'
  },
  {
    name: '深化图纸编号',
    value: 'num',
    type: 'input'
  },
]
const modalMaterialColumns = [
  {
    title: '序号',
    width: 80,
    align: 'center',
    customRender: (text, record, index) => {
      return index + 1
    }
  },
  {
    title: '深化图纸名称',
    dataIndex: 'name'
  },
  {
    title: '深化图纸编号',
    dataIndex: 'num'
  },
  {
    title: '深化图纸版本号',
    dataIndex: 'drawVersion'
  },
]

export {
  searchOption,
  columns,
  deepList,
  searchUnitArr,
  modalUnitColumns,
  searchMaterialArr,
  modalMaterialColumns,
}

